////package com.xiu.travel.config;
////
////import org.springframework.context.annotation.Configuration;
////import org.springframework.core.Ordered;
////import org.springframework.core.annotation.Order;
////import org.springframework.stereotype.Component;
////import org.springframework.web.cors.CorsConfiguration;
////import org.springframework.web.cors.CorsConfigurationSource;
////import org.springframework.web.cors.reactive.UrlBasedCorsConfigurationSource;
////import org.springframework.web.filter.CorsFilter;
////
////import java.util.Arrays;
////import java.util.Collections;
////import java.util.List;
////
/////**
//// * 全局跨域配置
//// * 注意：前端从网关进行调用时需要配置
//// *
//// * @author yingyingying
//// * @date 2023/3/12 01:02
//// */
////@Component
////@Order(Ordered.HIGHEST_PRECEDENCE)
////public class GlobalCorsConfig extends CorsFilter
////{
////
////
////    public GlobalCorsConfig(CorsConfigurationSource configSource)
////    {
////        super(configSource);
////    }
////
////    private static UrlBasedCorsConfigurationSource configurationSource()
////    {
////        CorsConfiguration corsConfig = new CorsConfiguration();
////        List<String> allowedHeaders = Arrays.asList("x-auth-token", "content-type", "X-Requested-With",
////                                                    "XMLHttpRequest");
////        List<String> exposedHeaders = Arrays.asList("x-auth-token", "content-type", "X-Requested-With",
////                                                    "XMLHttpRequest");
////        List<String> allowedMethods = Arrays.asList("POST", "GET", "DELETE", "PUT", "OPTIONS");
////        List<String> allowedOrigins = Collections.singletonList("*");
////        corsConfig.setAllowedHeaders(allowedHeaders);
////        corsConfig.setAllowedMethods(allowedMethods);
////        corsConfig.setAllowedOrigins(allowedOrigins);
////        corsConfig.setExposedHeaders(exposedHeaders);
////        corsConfig.setMaxAge(36000L);
////        corsConfig.setAllowCredentials(true);
////
////        UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
////        source.registerCorsConfiguration("/**", corsConfig);
////        return source;
////    }
////}
////
//{
//        String myMchid = "1641640489"
//        String myAppid = "wxaee433f843fbd0a6"
//        String myOut_trade_no = "1111111"; //商户系统内部的订单号,32个字符内、可包含字母；重新下单时请更换单号，其他说明见商户订单号 示例值：1217752501201407033233368018
//        String myAuto_code = "130222222222" //付款码
//        Int myPayTotal = 100 //付款金额 单位 分
//        String myAttach = "附加数据，在查询API和支付通知中原样返回，该字段主要用于商户携带订单的自定义数据"
//        String myDescription = "商品描述"
//
//
//        String operator_id = "11111" //收银员id
//        String storeId = "00001";
//        String storeName = "科技南路店"
//        String storeAddress = "店铺地址"
//        JSONOBJECT myScene_info = {
//        "operator_id": operator_id,
//        "store_info": {
//        "id": storeId,
//        "name": storeName,
//        "address": storeAddress
//        }
//        }
//
//        {
//        "appid": myAppid,
//        "mchid": myMchid,
//        "out_trade_no": myOut_trade_no,
//        "merchant_category_code": "5331",
//        "payer": {
//        "auth_code": myAuto_code
//        },
//        "trade_type": "MICROPAY",
//        "amount": {
//        "total": myPayTotal,
//        "currency": "CNY"
//        },
//        "attach": myAttach,
//        "description": myDescription,
//        "goods_tag": "", //商品标记
//        "limit_pay": "no_credit",
//
//        "scene_info": myScene_info
//        }
//        }

//        {
//        "id": "4200001771202304191283223308",
//        "appid": "wxaee433f843fbd0a6",
//        "mchid": "1641640489",
//        "out_trade_no": "880a471494c6496aa527f014e44e13c1",
//        "payer": {
//        "openid": "oZwfJ5lgM4Bg76amk03sOocHpMos"
//        },
//        "amount": {
//        "total": 1,
//        "currency": "CNY",
//        "payer_total": 1,
//        "payer_currency": "CNY",
//        "exchange_rate": {
//        "type": "SETTLEMENT_RATE",
//        "rate": 100000000
//        }
//        },
//        "trade_type": "MICROPAY",
//        "trade_state": "SUCCESS",
//        "trade_state_desc": "支付成功",
//        "bank_type": "COMM_DEBIT",
//        "success_time": "2023-04-19T22:12:46+08:00"
//        }

//{
//        "id": "207a4658-fc28-5811-9c7b-77e25d438384",
//        "create_time": "2023-04-23T21:50:03+08:00",
//        "resource_type": "encrypt-resource",
//        "event_type": "REFUND.SUCCESS",
//        "summary": "退款成功",
//        "resource": {
//        "original_type": "refund",
//        "algorithm": "AEAD_AES_256_GCM",
//        "ciphertext": "wiLHXENa8LSAgHbvbve8zwaWUXQ9G//BmLOdM9MBEFjLhg3pQn9r9uWvAZGQjxo9dylb4zYFKres5/O4cCFB85+66pifjrPxcO6bvmSGoPCzS3bP4CzCStTpuLNHJlED1OsRjvttFVMFnZ/QJ6IOhZdZSU2x5o424s6MDT9J/qn5jaMd6Ijd3o89uqBHGpHMAeDolk/vHKA64RWiXLvs4IcocnWDzFefpsa8Nm89CybR92Zx+mUc701jvCmWJL4PWAWiJjP0wprP9kxfIvcs/mdUkw0WVsj/w1JSzM+7BuCKQQqb4+HG7LyvybiKpJLLyq/FtGpDaaVYq1yZDFzoAYuf0YLVZaXZW/+twMLUwxbTfWI2f2W2uSLfp5ZWJs5KgJ3k35SBTLokzjnc05YSlvB/epb6cp0WAn0kmIcAMridzA6VUG6tFuPv6Rz3Z9H7eOdf94oMbhuWRYRjDIbotypHJhlyTlQ88iiZHeLDYsjHrngHkmhN36zCQNRr7KHJ0peUm/17KI8x0BaG4IRfcK4I9w==",
//        "associated_data": "refund",
//        "nonce": "fTquBdynaKfY"
//        }
//        }

//{
//        "mchid": "1641640489",
//        "out_trade_no": "11330402052608000",
//        "transaction_id": "4200001782202304239082522623",
//        "out_refund_no": "11330984343638016",
//        "refund_id": "50302505502023042333641800807",
//        "refund_status": "SUCCESS",
//        "success_time": "2023-04-23T21:50:03+08:00",
//        "amount": {
//        "total": 99999,
//        "refund": 99999,
//        "payer_total": 99999,
//        "payer_refund": 99999
//        },
//        "user_received_account": "建设银行借记卡2304"
//        }


//        {
//            "return_code": "响应码：01成功 ，02失败，响应码仅代表通信状态，不代表业务结果",
//            "return_msg": "返回信息提示，“支付成功”，“支付中”，“请求受限”等",
//            "key_sign": "《2.4签名算法》 签名测试页",
//            "result_code": "业务结果：01成功，02失败，03支付中，99该条码暂不支持支付类型自动匹配",
//            "pay_type": "支付方式：010微信，020 支付宝，060qq钱包，100翼支付，110银联二维码",
//            "merchant_name": "商户名称",
//            "merchant_no": "商户号",
//            "terminal_id": "终端号",
//            "device_no": "商户终端设备号(商户自定义，如门店编号)，必须在平台已配置过",
//            "terminal_trace": "终端流水号，商户系统的订单号，系统原样返回",
//            "terminal_time": "终端交易时间，yyyyMMddHHmmss，全局统一时间格式，系统原样返回",
//            "total_fee": "金额，单位分",
//            "buyer_pay_fee": "买家实付金额（分），pay_ver为202时返回",
//            "platform_discount_fee": "平台优惠金额（分），pay_ver为202时返回",
//            "merchant_discount_fee": "商家优惠金额（分），pay_ver为202时返回",
//            "end_time": "支付完成时间，yyyyMMddHHmmss，全局统一时间格式",
//            "out_trade_no": "平台唯一订单号",
//            "channel_trade_no": "通道订单号，微信订单号、支付宝订单号等",
//            "channel_order_no": "银行渠道订单号，微信支付时显示在支付成功页面的条码，可用作扫码查询和扫码退款时匹配",
//            "user_id": "付款方用户id，“微信openid”、“支付宝账户”",
//            "attach": "附加数据,原样返回",
//            "receipt_fee": "商家应结算金额,单位分",
//            "bank_type": "银行类型，采用字符串类型的银行标识",
//            "promotion_detail": "官方营销详情,pay_ver=202时返回.本交易支付时使用的所有优惠券信息，单品优惠功能字段，详情见《优惠字段说明》",
//            "order_body": "订单标题描述",
//            "sub_openid": "微信子商户sub_appid对应的用户标识"
//        }



//        {
//            "trade_no": "String, 支付宝交易号",
//            "out_trade_no": "String, 商户订单号",
//            "buyer_logon_id": "String, 买家支付宝账号",
//            "total_amount": "Price, 交易金额",
//            "receipt_amount": "String, 实收金额",
//            "buyer_pay_amount": "Price, 买家付款的金额",
//            "point_amount": "Price, 使用集分宝付款的金额",
//            "invoice_amount": "Price, 交易中可给用户开具发票的金额",
//            "gmt_payment": "Date, 交易支付时间",
//            "fund_bill_list": [
//            {
//            "fund_channel": "String, 交易使用的资金渠道",
//            "amount": "Price, 该支付工具类型所使用的金额",
//            "real_amount": "Price, 渠道实际付款金额"
//            }
//            ],
//            "store_name": "String, 发生支付交易的商户门店名称",
//            "discount_goods_detail": "String, 本次交易支付所使用的单品券优惠的商品优惠信息",
//            "buyer_user_id": "String, 买家在支付宝的用户id",
//            "voucher_detail_list": [
//            {
//            "voucher_id": "String, 券ID",
//            "name": "String, 券名称",
//            "type": "String, 券类型",
//            "amount": "Price, 优惠券面额",
//            "merchant_contribute": "Price, 商家出资金额",
//            "other_contribute": "Price, 其他出资方出资金额",
//            "memo": "String, 优惠券备注信息"
//            }
//            ],
//            "mdiscount_amount": "String, 商家优惠金额",
//            "discount_amount": "String, 平台优惠金额"
//        }


//        请求：
//
//        {
//        "subject": "宅家欢便利店-大鸟转转转",
//        "scene": "bar_code",
//        "auth_code": "288424855421348856",
//        "out_trade_no": "12312317375765565935616",
//        "total_amount": 0.01
//        }
//
//        响应：
//
//        {
//        "alipay_trade_pay_response": {
//        "code": "40004",
//        "msg": "Business Failed",
//        "sub_code": "ACQ.PAYMENT_AUTH_CODE_INVALID",
//        "sub_msg": "支付失败，获取顾客账户信息失败，请顾客刷新付款码后重新收款，如再次收款失败，请联系管理员处理。[SOUNDWAVE_PARSER_FAIL]",
//        "buyer_pay_amount": "0.00",
//        "invoice_amount": "0.00",
//        "point_amount": "0.00",
//        "receipt_amount": "0.00"
//        },
//        "sign": "hCyiLkmR55U8kRGe9YpC/sQkb7GE6dW2yUWcKI2Oz/SMvtcSrJkY6WKT40tbTEUEnhQ9SG7OaswBf/zuU5RjE4c3trGDpva6attX10CttORPSoDwp7zFr0NByqAzxCJQg+xn+ROo6Ma70k2GNiO/3B/3bhSPlEwTBxtU5VYfBbEWxlHsuQvn9Q4GJCnVYou2a40Ikq++DMv0urA5a1bxzRKCvus8ujvGEaKJ5AapE6cV1kzvO4CykPEYzNU2IoEC4VFxKdzuYAvFSoHpfbEYXpBLQ8uxkoEKAWH8SIwlASHYNdQ+At5hu1QK13uLytV54KFkGipJfJzpo7SMjwgfEw=="
//        }


//        {
//        "code": "10000", // 接口返回码
//        "msg": "Success", // 返回信息
//        "buyer_logon_id": "jbm***@sandbox.com", // 买家支付宝账号
//        "buyer_pay_amount": "0.01", // 买家实付金额
//        "buyer_user_id": "2088722003045236",` // 买家在支付宝的用户ID
//        "buyer_user_type": "PRIVATE", // 买家用户类型
//        "fund_bill_list": [ // 交易支付使用的资金渠道
//        {
//        "amount": "0.01", // 该资金渠道使用的金额
//        "fund_channel": "ALIPAYACCOUNT" // 资金渠道类型
//        }
//        ],
//        "gmt_payment": "2023-05-10 16:08:16", // 交易付款时间
//        "invoice_amount": "0.01", // 发票金额
//        "out_trade_no": "12312317405596055769088", // 商户订单号
//        "point_amount": "0.00", // 使用集分宝支付的金额
//        "receipt_amount": "0.01", // 实收金额
//        "total_amount": "0.01", // 订单总金额
//        "trade_no": "2023051022001445230500051728" // 交易号
//        },
//        "sign": "OTwBBJQzfy1CN1c5TOmAZcqhaoL6HXSCOgGsbS2v90XVwS+QJHvJK3
//        OfJ1bjVxrCrbpj5f2ib2eZd7lk8dZcKiEgiUBNa6HWkE/q41yl8Y8eB5Bame3r+
//        fCGEF0PtEH0/jc/a/YijP9Li/lftpcob1o1QjIvErU+RyftSkBYE/RvWwnRwRN+
//        H2sdXfCGUo37d5rVy6bLOoQ3O2lFEArn84R4P8WlcNdNkakxWyL1OjQl0D2tfV1
//        hUbPDjD2ML4NCboFtzD+bhEagrTVXH1bZXVE1CpX/1UzM7LslkmxcPaOWEhEIBg
//        LIqgJJpyDt92P8/rwn+QFidC7V+WsYXIQZCA==" // 签名信息
//        }

//        {
//        "alipay_trade_refund_response": {
//        "code": "10000",
//        "msg": "Success",
//        "buyer_logon_id": "jbm***@sandbox.com",
//        "buyer_user_id": "2088722003045236",
//        "fund_change": "Y",
//        "gmt_refund_pay": "2023-05-10 19:20:26",
//        "out_trade_no": "12312317440548428320768",
//        "refund_detail_item_list": [
//        {
//        "amount": "20.00",
//        "fund_channel": "ALIPAYACCOUNT"
//        }
//        ],
//        "refund_fee": "20.00",
//        "send_back_fee": "20.00",
//        "trade_no": "2023051022001445230500053146"
//        },
//        "sign": "WQ3TjipOKv3NezxmdaHz+UHag6fAykANXX/2vMpnBOBGJQhz+nlyFNVIbETXuSD5YDbIKFioOE8nSPLZrZJNQn9mzp92KCIy6JLYrPIqcBjMrHQnU7nXRXwizxlDKg7/euhZwN6Y07XEE7HwckbQy7/nA16EoXa0ypFoBOvCYIDL+VPxy4gOUbqG1oRn1ohd1OBb8FdPhtQTUNSe2GIl+M8srKSTiQX3x490JcxGtVUt7gUrjiSZJIkOu2KPhnlcd5uDz1aeJHDGLsvNdkJP90lWl28lz3N6fMOd67Eh7T6GG9T/RcSI+SOlBcXNqFOcvB0FiJ6U5AjhizSah14tZg=="
//        }
//        {
//        "amount": {
//        "currency": "CNY",
//        "discount_refund": 0,
//        "from": [],
//        "payer_refund": 1,
//        "payer_total": 1,
//        "refund": 1,
//        "refund_fee": 0,
//        "settlement_refund": 1,
//        "settlement_total": 1,
//        "total": 1
//        },
//        "channel": "ORIGINAL",
//        "create_time": "2023-05-13T18:13:02+08:00",
//        "funds_account": "AVAILABLE",
//        "out_refund_no": "18524168316391424",
//        "out_trade_no": "12312318523980726145024",
//        "promotion_detail": [],
//        "refund_id": "50300605652023051334393534404",
//        "status": "SUCCESS",
//        "success_time": "2023-05-13T18:13:10+08:00",
//        "transaction_id": "4200001876202305138248244373",
//        "user_received_account": "交通银行借记卡7284"
//        }

